package org.dromara.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * @author 王星
 * @date 2024/6/27 下午5:53
 */
@Getter
@AllArgsConstructor
public enum PlatformConcreteEnum {

    TRADING_WATER(1, "TRADING_WATER", "tradingWater", "通知"),

    TRADING_WATER_ASSEMBLE(1, "TRADING_WATER_ASSEMBLE", "tradingWaterAssemble", "MQ通知"),


    ;

    //1 集合 2 对象
    private final Integer returnType;
    private final String key;
    private final String type;
    private final String desc;

    public static PlatformConcreteEnum findOne(String value) {
        return Arrays.stream(PlatformConcreteEnum.values())
                .filter(type -> type.getType().equals(value)).findAny().orElse(null);
    }
}
